﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using ReportPrinting;

namespace LanAnh
{
    public partial class printSanPham : Form
    {
        public printSanPham()
        {
            InitializeComponent();         
        }
        public printSanPham(DataTable dtb)
        {
            InitializeComponent();
            dt = dtb;
        }
        DataTable dt;
       DataSet  m_dataSet;
       Data data = new Data();
       ReportPrinting.PrintDataGrid m_PrintDataGrid;
        private void printSanPham_Load(object sender, EventArgs e)
        {
            DataGrid1.DataSource = dt;
            m_PrintDataGrid = new ReportPrinting.PrintDataGrid(this.DataGrid1);
            m_PrintDataGrid.PrintPreview();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            m_PrintDataGrid.PrintPreview();
        }
    }
}
